home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2004 June
/
Chip_2004-06_cd1.bin
/
software
/
tsw
/
tsw.exe
/
{app}
/
scripts
/
Make ordered list.tss
< prev
next >
Wrap
Text File
|
2003-07-09
|
615b
|
32 lines
{
[Scriptsettings]
Scriptname=Create ordered list from selected lines
ExecuteOnStartup=0
ExecuteOnlyOnce=0
}
Program MakeList;
function ListIt(s: string) : string;
var
i: integer;
TempList: TStringList;
Output: string;
begin
Output := '<ol>'+#13#10;
TempList := TStringList.Create;
TempList.Text := s;
for i := 0 to TempList.Count - 1 do
if TempList.Strings[i] <> '' then
Output := Output + ' <li>'+TempList.Strings[i]+#13#10;
Output := Output + '</ol>'+#13#10;
Result := Output;
end;
var
Code: string;
begin
Code := GetSelText;
SetSelText(ListIt(Code));
end.